<div class="page-3 cart commonPage">
	<div class="bg-3"></div>
	<?php echo $this->element('sidebar'); ?>
	<div class="box-right zhigh">
        <?php echo $this->element('banner'); ?>
			<div class="title">
                <ul class="breadcrumbs">
                    <li><a href="<?php echo $this->General->base_url() ?>"><img style="position: relative; top: 2px;" src="<?php echo $this->webroot ?>images/home-yl-2.png" /></a></li>
                    <?php
                        foreach($breadcrumbs as $breadcrumb)
                        {
                            echo '<li><a href="'.$this->General->base_url().$breadcrumb['link'].'">'.$breadcrumb['title'].'</a></li>';
                        }
                    ?>
                </ul>
			</div>
		<?php echo $this->element('header'); ?>
		<div class="box-content">
			<div class="post-content">
                <div class="map">
                <!--
                    <iframe src="<?php echo $contacts['article']['other'] ?>" width="100%" height="300" frameborder="0" style="border:0"></iframe>
                -->
                <?php
                    $map = $contacts['article']['other'];
                    $array_map = explode(',', $map);
                    $lat = trim(@$array_map[0]);
                    $lng = trim(@$array_map[1]);
                ?>
                <iframe width="100%" height="300" id="location" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"
            		src="https://maps.google.com/maps?q=<?php echo $lat ?>,<?php echo $lng ?>&amp;hl=en&amp;ie=UTF8&amp;t=m&amp;z=15&amp;iwloc=A&amp;ll=<?php echo $lat ?>,<?php echo $lng ?>&amp;output=embed">
            	</iframe>
                </div>
                <div class="desc-contact">
                    <?php echo $contacts['article_desc']['description'] ?>
                </div>
                <div class="form-contact">
                    <form id="contact_form" name="" method="post" action="">
                        <h4>Liên hệ trực tiếp đến chúng tôi qua form</h4>
                        <p>
                            <label><?php $this->General->translate('name') ?>:</label>
                            <input type="text" name="name" value="" />
                        </p>
                        <p>
                            <label><?php $this->General->translate('address') ?>:</label>
                            <input type="text" name="address" value="" />
                        </p>
                        <p>
                            <label><?php $this->General->translate('phone') ?>:</label>
                            <input type="text" name="phone" value="" />
                        </p>
                        <p>
                            <label><?php $this->General->translate('email') ?>:</label>
                            <input type="text" name="email" value="" />
                        </p>
                        <p>
                            <label><?php $this->General->translate('title') ?>:</label>
                            <input type="text" name="subject" value="" />
                        </p>
                        <p>
                            <label><?php $this->General->translate('content') ?>:</label>
                            <textarea name="message"></textarea>
                        </p>
                        <p>
                            <input type="submit" name="" value="<?php $this->General->translate('send') ?>" />
                            <span><?php echo $send_status ?></span>
                        </p>
                    </form>
                </div>
                <div class="info-contact">
                    <?php echo $contacts['article_desc']['long_description'] ?>
                </div>
            </div>
		</div>
	</div>
	<?php echo $this->element('footer'); ?>
</div>
<script>
    $(document).ready(function(){
        var validator = $("#contact_form").validate({ 
        rules: { 
            name: "required", 
            subject: "required", 
            message: "required", 
            email: { 
                required: true, 
                email: true,
            }
        }, 
        messages: { 
            name: "Hãy điền tên đăng nhập.", 
            subject: "Hãy điền tiêu đề.", 
            message: "Điền nội dung liên hệ.", 
            email: { 
                required: "Hãy nhập 1 địa chỉ email hợp lệ", 
                email:"Địa chỉ email không hợp lệ",
                remote:"Email da co nguoi su dung"
            }
        },

    });

        
    });
</script>
